<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <link rel="stylesheet" href="../css/iconfont.css">
  <link rel="stylesheet" href="../css/common.css">
  <link rel="stylesheet" href="../css/index.css">
</head>

<body>
  我们的家里了吧
</body>
<script>
  // 1536 824
  window.addEventListener("DOMContentLoaded", () => {
    /* let spans = [], x, y = -20, angle = 0, angle_speed_direction;
    for (let i = 0; i < 10; i++) {
      let span = document.createElement("span");
      let att_class = document.createAttribute("class");
      att_class.value = "icon-snowflake";
      span.setAttributeNode(att_class);
      document.body.appendChild(span);
    };
    let doc_span = document.querySelectorAll("span");
    let move_span = () => {
      if (!doc_span[0].style.getPropertyValue("--font_size")) {
        console.log(`值做一次了吧`);
        x = Math.random() * 1536;
        angle_speed_direction = (Math.random() * (3 - 1) + 1) * Math.random() - 0.5 > 0 ? 1 : -1;
        doc_span[0].style.setProperty("--font_size", 4 + Math.random() * 30);
      };
      doc_span[0].style.setProperty("--x", x);
      doc_span[0].style.setProperty("--y", y);
      x = x + 1;
      y = y + 1;
      // doc_span[0].style.setProperty("--angle", angle += angle_speed_direction);
      console.log(doc_span[0]);
      if (x > 1536 || x <= 0 || y > 824) {
        // document.body.removeChild(doc_span[j]);
      } else {
        window.requestAnimationFrame(move_span);
      };
    }; */
    // window.requestAnimationFrame(move_span);
  });
</script>

</html>